import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;


public class ASINTechnicalDetails {
private String ASIN;
private String detailLine;
public String getASIN() {
	return ASIN;
}
public void setASIN(String aSIN) {
	ASIN = aSIN;
}
public String getDetailLine() {
	return detailLine;
}
public void setDetailLine(String detailLine) {
	this.detailLine = detailLine;
}

public static void insert(Connection connection,List<ASINTechnicalDetails> list){
	if(list.size()<1) return;
	try {
		PreparedStatement ps = connection
				.prepareStatement("insert into ASINTechnicalDetails(ASIN,detailLine) values(?,?)");
		for (ASINTechnicalDetails dt : list) {
			ps.setString(1, dt.getASIN());
			
			ps.setString(2, dt.getDetailLine());
			
			ps.addBatch();
		}
	 	
 ps.executeBatch();
		connection.commit();
			} catch (SQLException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	
	
}

}
